﻿<style>
    .ttModeration {
        max-width: 800px !important;
    }

    .frameModeration {
        border: 0;
    }
</style>
<script type="text/javascript">
    var moderationManager = new function () {
        var ttModeration = null;

        this.showModeration = function (user, level, node) {
            var url = "/Account/ModerationPopup?user=" + user + "&level=" + level + "&node=" + node;
            //console.log(url);
            if (ttModeration == null) {
                ttModeration = $("<div />").qtip({
                    id: "ttModeration",
                    content: { text: "<iframe class='frameModeration' id='frameModeration' src=\"" + url + "\" width=475 height=200></iframe>", title: { text: "@Resources.Intercamber.Moderate_PageName", button: true } },
                    position: { my: 'center', at: 'center', target: $(window), viewport: $(window), adjust: { method: "shift", x: 0, y: 0 }, effect: false },
                    hide: 'unfocus',
                    style: { classes: "qtip-bootstrap qtip-shadow ttModeration", width: 500, height: 235, },
                    events: {
                        show: function () {
                            $(this).draggable();
                        }
                    }
                }).qtip("show");
            } else {
                $("#frameModeration").attr('src', url);
                ttModeration.qtip("show");
            }
        };

    };
</script>
